<template>
<uni-shadow-root class="utoolsParse-widget-swiper-explorationsp-box-box"><view v-if="show" :style="'position: '+(mf_data.style.position || 'relative')+';width: '+(mf_data.style.width ||750)+'rpx;height: '+(mf_data.style.height ||350)+'rpx;background: transparent;position:'+(mf_data.style.position)+';top:'+(mf_data.style.position == 'relative' ? 0 : mf_data.style.y)+'rpx;left:'+(mf_data.style.position == 'relative' ? 0 : mf_data.style.x)+'rpx;margin-top:'+(mf_data.style.position == 'relative' ? mf_data.style.marginTop : 0)+'rpx;margin-left:'+(mf_data.style.position == 'relative' ? mf_data.style.marginLeft : 0)+'rpx;z-index: 1;'">
    <scroll-view :data-id="mf_data.id" :scroll-x="true" :style="'width: '+(mf_data.style.width ||750)+'rpx;height: '+(mf_data.style.height ||350)+'rpx;'" v-if="mf_data.visibility=='visible'" class="scrollView">
        <view :style="'width: '+(mf_data.style.scrollWidth ||750)+'rpx;height: '+(mf_data.style.scrollHeight ||350)+'rpx;position: relative;display: flex;'">
			 <block v-for="(item,index) in (mf_data.children)" :key="item.id">
				<block v-if="item.type=='img'"><widget-image :mf_data="item" :mf_style="'animation-delay:'+(0.25*index)+'s;'" mf_class="item-animation"></widget-image></block>
				<block v-if="item.type=='video'"><widget-video isSp="{{true}}" :custom-appear="customAppear" :mf_data="item" mf_class="item-animation" :mf_style="'animation-delay:'+(0.25*index)+'s;'"></widget-video></block>
				<block v-if="item.type=='text'"><widget-text :mf_data="item" mf_class="item-animation" :mf_style="'animation-delay:'+(0.25*index)+'s;'"></widget-text></block>
				<block v-if="item.type=='hotSpace'"><widget-hot :box-type="boxType" :mf_data="item"></widget-hot></block>
			</block>
        </view>
    </scroll-view>
</view></uni-shadow-root>
</template>

<script>
import WidgetImage from '../../../image/image.vue'
import WidgetText from '../../../text/text.vue'
import WidgetHot from '../../../hot/hot.vue'
import WidgetVideo from '../../../video/video.vue'
global['__wxVueOptions'] = {components:{'widget-image': WidgetImage,'widget-text': WidgetText,'widget-hot': WidgetHot,'widget-video': WidgetVideo}}

global['__wxRoute'] = 'utoolsParse/widget/swiper/explorationsp/box/box'
// import mixin from '../../mixins'
const mixin = require('../../../../mixins');

Component({
  behaviors:[mixin],
    data: {
		show: !false
	},
    properties: {
      mf_data: Object,
      customAppear:{
		  type:Boolean,
		  observer: function(newVal, oldVal) {
				// if(newVal|| oldVal) {
				// 	this.setData({show: true})
				// }
	        }
	  },
	  boxType:String,
      type:String
    },
	ready() {

	},
    attached(){

    },
    methods: {
        clickEvent(){
            // this.onTapEvent()
        }
    },
});
export default global['__wxComponents']['utoolsParse/widget/swiper/explorationsp/box/box']
</script>
<style platform="mp-weixin">

</style>
